Fix AAS registry descriptor synchronization#1034
Merged
aaronzi merged 2 commits intoJul 19, 2026
Merged
Conversation
Signed-off-by: Aaron Zielstorff <aaron.zielstorff@iese.fraunhofer.de>
aaronzi
marked this pull request as ready for review
July 19, 2026 14:16
Signed-off-by: Aaron Zielstorff <aaron.zielstorff@iese.fraunhofer.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Description of Changes
The registry integration created and deleted AAS descriptors, but it did not keep them in sync when an AAS or its Asset Information was updated. This change updates the descriptor after both operations and retains existing Submodel Descriptors and Registry-managed endpoint metadata.
Mutations for the same AAS are serialized within one repository instance so that concurrent updates, rollbacks, deletes, and Submodel reference changes cannot overtake each other. If a Registry PUT returns an ambiguous error, the integration reads the descriptor back and only rolls the repository back when the requested AAS-derived state is not present.
Registry deletion now calls DELETE directly, treats only 404 as already absent, and keeps the local AAS for every other Registry failure. Link and unlink errors include the operation, HTTP status, and response body.
The feature documentation now lists the required Registry permissions: CREATE for creation, READ and UPDATE for synchronization, and DELETE for deletion.
Related Issue
Closes #998
Closes #1016
Closes #927
BaSyx Configuration for Testing
No special configuration is required for the unit tests. They use the in-memory backend and a mocked Registry client.
The service-backed integration tests use the existing regintegration, multiurl, and authregistry profiles with their corresponding Registry and Keycloak services.
AAS Files Used for Testing
The existing AasSimple_1.json fixture is used by the HTTP integration tests. The unit tests create their AAS instances programmatically.
Additional Information
The fix was implemented test-first. Regression tests cover descriptor updates, rollback behavior, concurrent same-instance mutations, ambiguous PUT responses, endpoint and Submodel Descriptor preservation, detailed create/delete errors, and Registry permission failures.
The Registry API currently has no conditional PUT or partial Shell Descriptor update. Direct descriptor changes by another Registry client therefore must not run concurrently with an AAS update if both changes need to be retained.
Validation performed:
The full service-backed module suite was also attempted locally. Its external-service cases could not run because the Registry and Keycloak test services were not available.
Please ensure that you have tested your changes thoroughly before submitting the pull request.